package com.mall.business.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mall.common.annotation.Excel;
import com.mall.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用户优惠券对象 t_coupon_user
 *
 * @author ruoyi
 * @date 2025-03-30
 */
@Data
@TableName(value = "t_coupon_user")
@EqualsAndHashCode(callSuper = true)
public class TCouponUser extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    /**
     * "优惠券Id"
     */
    @Excel(name = "优惠券Id")
    private String couponId;
    /**
     * "优惠券名称"
     */
    @Excel(name = "优惠券名称")
    private String name;
    /**
     * "金额"
     */
    @Excel(name = "金额")
    private BigDecimal money;
    /**
     * "有效开始时间"
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "有效开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startDate;
    /**
     * "有效截止时间"
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "有效截止时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;
    /**
     * "使用时间"
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "使用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date useTime;
    /**
     * "获取方式"
     */
    @Excel(name = "获取方式")
    private String type;
    /**
     * "状态"
     */
    @Excel(name = "状态", readConverterExp = "0=：未使用，1：已使用,,2=:已失效")
    private String status;
    /**
     * "用户Id"
     */
    @Excel(name = "用户Id")
    private String userId;

    /**
     * "使用人姓名"
     */
    @TableField(exist = false)
    private String nickName;

}
